package com.xyw.his00.config;
import com.xyw.his00.entity.ResponseData;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

//全局异常处理器
@RestControllerAdvice
public class GlobalExceptionHandler {
    //异常处理类
    @ExceptionHandler(Exception.class)
    public ResponseData ex(Exception ex){
        ex.printStackTrace();
        return ResponseData.ERROR;
    }
}
